package com.shuyu.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@ApiModel(description = "审批流程完全流程")
@TableName("tbl_approval_process_flow")
public class ApprovalProcessFlow implements Serializable {
    private static final long serialVersionUID = 3385631045640484658L;
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty(value = "审批流程详情ID")
    private Integer detailId;
    @ApiModelProperty(value = "用户ID")
    private Long userId;
    @ApiModelProperty(value = "用户名")
    private transient String username;
    @ApiModelProperty(value = "审批节点索引")
    private Integer processIndex;
    @ApiModelProperty(value = "授权用户ID")
    private Long authorizationUserId;
    @ApiModelProperty(value = "授权用户名")
    private transient String authorizationUsername;
    @ApiModelProperty(value = "审核状态0待审核 1审核通过 2审核未通过")
    private Integer auditingStatus;
    @ApiModelProperty(value = "审核说明")
    private String auditingRemark;


    private Date createTime;
    @ApiModelProperty(value = "审批时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date auditingTime;

    public ApprovalProcessFlow() {
    }

    public ApprovalProcessFlow(Integer detailId, Long userId, Integer processIndex, Integer auditingStatus, Date createTime) {
        this.detailId = detailId;
        this.userId = userId;
        this.processIndex = processIndex;
        this.auditingStatus = auditingStatus;
        this.createTime = createTime;
    }
}
